﻿using System;

using System.Collections.Generic;
using System.Text;
using Silvermoon.Controls;
using Silvermoon.Shapes;
using Silvermoon.Images;
using System.Drawing;

namespace Silvermoon.Windows.Styles
{
    public class MetroRadioButtonStyle : StyleBase
    {
        public static readonly MetroRadioButtonStyle Instance = new MetroRadioButtonStyle();

        public override void Apply(Silvermoon.Controls.Control c)
        {
            RadioButton rb = c as RadioButton;
            if (rb != null)
            {
                if (rb.Background == null) rb.Background = new BackgroundShape { Texture = SysImages.RadioBackground, Size = Control.ScaledSize(48, 48), Style = RenderStyle.Simple };
                if (rb.RadioShape == null) rb.RadioShape = new BackgroundShape { Texture = SysImages.RadioCheck, Size = Control.ScaledSize(48, 48), Style = RenderStyle.Simple, Color = PhoneColors.Accent };
                if (rb.Color.IsEmpty) rb.Color = PhoneColors.Light;
            }
        }
    }
}
